Dynamic Search Priority at Conversation Time
While you can configure default search priorities at the data source level, you can also override these priorities dynamically at runtime during a live conversation.
Info: This feature is available starting with Druid 10.1.
To adjust search priorities dynamically:
- Navigate to the desired flow step where you want to apply the priority change.
- In the step configuration editor, click on Set variables.
- Set [[Intent]].KBWeights using a JavaScript function that maps your data source names to the desired priority levels (low, medium, or high).
- Save the step.
Copy
Example
(function(){
return {DataSource1: "low", DataSource2: "high", DataSource3: "high"};
})()
IMPORTANT!
- Case Sensitivity. While search priorities (e.g., "low", "high") are case-insensitive, data source names are case-sensitive. Ensure you match the exact capitalization of your data source names.
- Conversation Reset. Runtime weight overrides apply only to the active session. Upon conversation reset, the system automatically reverts to the default priorities configured at the data source level.